# @time     :2022/1/4
# @Author   :Simple
# @FileName :base_page
from selenium.webdriver.support.wait import WebDriverWait


def wait_element(driver, by, by_next):
    def wait():
        driver.find_element(*by).click()
        next_ele = driver.find_element(*by_next)
        return next_ele is not None
    WebDriverWait(driver, 10).until(wait())

